import request2 from '@/api/axios2';

/**
 * 
 * @param {查询任务实体} params 
 * @returns 
 */
const queryjob = (params) => {
    return request2({
        url: '/job/queryjob',
        method: 'get',
        params
    })
}
/**
 * 
 * @param {添加任务实体} params 
 * @returns 
 */
const addJob = (data) => {
    return request2({
        url: '/job/addJob',
        method: 'put',
        data
    })
}
/**
 * 
 * @param {修改任务信息} data 
 * @returns 
 */
const modifyJob = (data) => {
    return request2({
        url: '/job/modifyJob',
        method: 'put',
        data
    })
}
/**
 * 
 * @param {删除任务} data 
 * @returns 
 */
const deleteJob = (params) => {
    return request2({
        url: '/job/deleteJob',
        method: 'delete',
        params
    })
}
/**
 * 
 * @param {暂停任务数据} data 
 * @returns 
 */
const jobPause = (params) => {
    return request2({
        url: '/job/jobPause',
        method: 'put',
        params
    })
}

/**
 * 
 * @param {恢复任务数据} data 
 */
const jobResume = (params) => {
    return request2({
        url: '/job/jobResume',
        method: 'put',
        params
    })
}

/**
 * 获取所有在tasks包下的类
 */
const jobList = () =>{
    return request2({
        url: '/job/jobList',
        method: 'get'
    })
}

export {
    queryjob,
    addJob,
    jobResume,
    jobPause,
    deleteJob,
    jobList,
    modifyJob
}